diff --git a/django/utils/functional.py b/django/utils/functional.py
index ab0be502ce..24d0a6b6d0 100644
--- a/django/utils/functional.py
+++ b/django/utils/functional.py
@@ -79,7 +79,7 @@ def lazy(func, *resultclasses):
             self.__kw = kw
             if not self.__prepared:
                 self.__prepare_class__()
-            self.__prepared = True
+            type(self).__prepared = True
 
         def __reduce__(self):
             return (
@@ -143,12 +143,12 @@ def lazy(func, *resultclasses):
             return str(self.__cast())
 
         def __eq__(self, other):
-            if isinstance(other, Promise):
+            if isinstance(other, __proxy__):
                 other = other.__cast()
             return self.__cast() == other
 
         def __lt__(self, other):
-            if isinstance(other, Promise):
+            if isinstance(other, __proxy__):
                 other = other.__cast()
             return self.__cast() < other
 
